package com.yhyvr.console.callback;

import com.lz.mybatis.jdbc.auto.dao.BoOrderOperLogMapper;
import com.lz.mybatis.jdbc.auto.model.BoOrderOperLog;
import com.yhyvr.callback.YhyCallBackI;
import com.yhyvr.constant.ProxyOrderOperConstant;
import com.yhyvr.pojo.order.OrderLogMessage;

import javax.annotation.Resource;

/**
 * Created by - on 2016/11/7.
 */
public class WrightPayLogCallBack implements YhyCallBackI{
    private int userId;
    private String orderId;
    private BoOrderOperLogMapper boOrderOperLogMapper;
    private ProxyOrderOperConstant proxyOrderOperConstant;
    @Override
    public void callback() {
        boOrderOperLogMapper.insertSelective(OrderLogMessage.buildBoOrdeOperrLog(proxyOrderOperConstant,orderId,userId));
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public BoOrderOperLogMapper getBoOrderOperLogMapper() {
        return boOrderOperLogMapper;
    }

    public void setBoOrderOperLogMapper(BoOrderOperLogMapper boOrderOperLogMapper) {
        this.boOrderOperLogMapper = boOrderOperLogMapper;
    }

    public int getUserId() {
        return userId;
    }

    public ProxyOrderOperConstant getProxyOrderOperConstant() {
        return proxyOrderOperConstant;
    }

    public void setProxyOrderOperConstant(ProxyOrderOperConstant proxyOrderOperConstant) {
        this.proxyOrderOperConstant = proxyOrderOperConstant;
    }

    public WrightPayLogCallBack(int userId, String orderId, BoOrderOperLogMapper boOrderOperLogMapper, ProxyOrderOperConstant proxyOrderOperConstant) {
        this.userId = userId;
        this.orderId = orderId;
        this.boOrderOperLogMapper = boOrderOperLogMapper;
        this.proxyOrderOperConstant = proxyOrderOperConstant;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

}
